/**
  * @description: element-ui组件
  * @author: lxz
  * @update: lxz(2021-01-18)
  */

import 'element-ui/lib/theme-chalk/index.css'
import {
	Pagination,
	Dialog,
	Avatar,
	Autocomplete,
	Dropdown,
	DropdownMenu,
	DropdownItem,
	Menu,
	Submenu,
	MenuItem,
	MenuItemGroup,
	Input,
	InputNumber,
	Radio,
	RadioGroup,
	RadioButton,
	Checkbox,
	CheckboxButton,
	CheckboxGroup,
	Switch,
	Select,
	Option,
	OptionGroup,
	Button,
	ButtonGroup,
	Table,
	TableColumn,
	DatePicker,
	// TimeSelect,
	// TimePicker,
	Popover,
	Tooltip,
	Breadcrumb,
	BreadcrumbItem,
	Form,
	FormItem,
	Tabs,
	TabPane,
	Tag,
	Tree,
	// Alert,
	Slider,
	Icon,
	Row,
	Col,
	Upload,
	Progress,
	Badge,
	Card,
	Rate,
	Steps,
	Step,
	// Carousel,
	// CarouselItem,
	Collapse,
	CollapseItem,
	Cascader,
	// ColorPicker,
	// Transfer,
	Container,
	// Header,
	Aside,
	Main,
	// Footer,
	Loading,
	MessageBox,
	Message,
	Notification
} from 'element-ui'

export default (vue) => {
	vue.prototype.$ELEMENT = { size: 'medium' }

	vue.use(Pagination)
	vue.use(Dialog)
	vue.use(Avatar)
	vue.use(Autocomplete)
	vue.use(Dropdown)
	vue.use(DropdownMenu)
	vue.use(DropdownItem)
	vue.use(Menu)
	vue.use(Submenu)
	vue.use(MenuItem)
	vue.use(MenuItemGroup)
	vue.use(Input)
	vue.use(InputNumber)
	vue.use(Radio)
	vue.use(RadioGroup)
	vue.use(RadioButton)
	vue.use(Checkbox)
	vue.use(CheckboxButton)
	vue.use(CheckboxGroup)
	vue.use(Switch)
	vue.use(Select)
	vue.use(Option)
	vue.use(OptionGroup)
	vue.use(Button)
	vue.use(ButtonGroup)
	vue.use(Table)
	vue.use(TableColumn)
	vue.use(DatePicker)
	// vue.use(TimeSelect)
	// vue.use(TimePicker)
	vue.use(Popover)
	vue.use(Tooltip)
	vue.use(Breadcrumb)
	vue.use(BreadcrumbItem)
	vue.use(Form)
	vue.use(FormItem)
	vue.use(Tabs)
	vue.use(TabPane)
	vue.use(Tag)
	vue.use(Tree)
	// vue.use(Alert)
	vue.use(Slider)
	vue.use(Icon)
	vue.use(Row)
	vue.use(Col)
	vue.use(Upload)
	vue.use(Progress)
	vue.use(Badge)
	vue.use(Card)
	vue.use(Rate)
	vue.use(Steps)
	vue.use(Step)
	// vue.use(Carousel)
	// vue.use(CarouselItem)
	vue.use(Collapse)
	vue.use(CollapseItem)
	vue.use(Cascader)
	// vue.use(ColorPicker)
	// vue.use(Transfer)
	vue.use(Container)
	// vue.use(Header)
	vue.use(Aside)
	vue.use(Main)
	// vue.use(Footer)

	vue.use(Loading.directive)
	// 遮罩层会插入至 Dialog 的父元素上
	Dialog.props.modalAppendToBody.default = false
	// 点击空白处弹框不可关闭
	Dialog.props.closeOnClickModal.default = false
	vue.prototype.$loading = Loading.service
	vue.prototype.$msgbox = MessageBox
	vue.prototype.$alert = MessageBox.alert
	vue.prototype.$confirm = MessageBox.confirm
	vue.prototype.$prompt = MessageBox.prompt
	vue.prototype.$notify = Notification
	vue.prototype.$message = Message
}
